package com.ocgs.dao.impl;

import com.ocgs.dao.SystemAdminDAO;
import com.ocgs.mapper.SystemAdminMapper;
import com.ocgs.model.SystemAdmin;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: bryant
 * Date: 10/21/12
 * Time: 3:40 PM
 * To change this template use File | Settings | File Templates.
 */
public class SystemAdminDAOImpl implements SystemAdminDAO {

    private SqlSessionTemplate sqlSessionTemplate;

    public SqlSessionTemplate getSqlSessionTemplate() {
        return sqlSessionTemplate;
    }

    public void setSqlSessionTemplate(SqlSessionTemplate sqlSessionTemplate) {
        this.sqlSessionTemplate = sqlSessionTemplate;
    }

    
    public int deleteByPrimaryKey(Integer id) {
       return sqlSessionTemplate.getMapper(SystemAdminMapper.class).deleteByPrimaryKey(id);
        
    }

    
    public int insert(SystemAdmin record){
        return sqlSessionTemplate.getMapper(SystemAdminMapper.class).insert(record);

    }
    public int insertSelective(SystemAdmin record) {
        return sqlSessionTemplate.getMapper(SystemAdminMapper.class).insert(record);
    }

    
    public SystemAdmin selectByPrimaryKey(Integer id) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    
    public int updateByPrimaryKeySelective(SystemAdmin record) {
        return 0;  //To change body of implemented methods use File | Settings | File Templates.
    }

    
    public int updateByPrimaryKey(SystemAdmin record) {
        return 0;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public List<SystemAdmin> findAllSystemAdmin(SystemAdmin admin) {
        return sqlSessionTemplate.getMapper(SystemAdminMapper.class).findAllSystemAdmin(admin);
    }
}
